<template>
	<view class="comming">
		<view v-for="(item,index) in commingList" :key="index">
			<view class="comingTitle">{{item.comingTitle}}</view>
			<movie-item :item="item" :m_list="commingList"></movie-item>
		</view>

	</view>
</template>
<script>
	import movieItem from "../../components/movieItem.vue";
	export default {
		name: "coming",
		data() {
			return {
				commingList: []
			}
		},
		created() {
			this.getCommingList();
		},
		methods: {
			getCommingList() {
				uni.showLoading({
					title: '正在加载'
				});
				uni.request({
					method: 'get',
					url: `https://www.softeem.xin/maoyanApi/ajax/comingList?ci=57&token=&limit=10`,
					success: (res) => {
						res.data.coming.forEach(item => {
							item.img = item.img.replace("w.h", "128.180");
						})
						this.commingList.push(...res.data.coming);

					},
					complete: () => {
						uni.hideLoading();
					}
				})
			}
		},
		components: {
			movieItem
		}
	}
</script>
<style lang="scss" scoped>
	.comming {
		box-sizing: border-box;
		padding: 0 5upx;
	}

	.comingTitle {
		font-size: 28upx;
		display: flex;
		flex-direction: row;
		height: 60upx;
		align-items: center;
		box-sizing: border-box;
		padding-left: 5upx;
	}
</style>
